home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6937 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: redstone.interpath.net!mercury!softbase
  2. From: softbase@mercury.interpath.net (Scott McMahan - Softbase Systems)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Schildt <- Advanced Books
  5. Date: 16 Feb 1996 13:28:38 GMT
  6. Organization: Interpath -- Providing Internet access to North Carolina
  7. Message-ID: <4g20q6$lro@redstone.interpath.net>
  8. References: <8BA8405.02C70020DE.uuout@sourcebbs.com> <4fkmni$589@prairie.nodak.edu>
  9. NNTP-Posting-Host: mercury.interpath.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Where does Herb Schildt get his nutty ideas about "void main()"?
  13.  
  14. I've done a survey of "void main()" in ANSI DOS/Windows compilers.
  15. Schildt has used both MS C and Borland C and has presumably read
  16. their references on the subject.
  17.  
  18. * Microsoft's C/C++ 7.0 has an example in the help entry for the main
  19.   function that uses "void main()". I can't find that example in 
  20.   Visual C++ 1.0's help. 
  21.  
  22. * Borland C++ 4.5 says main() returns an int, but has no
  23.   example one way or the other. (I don't have 3.1 installed, 
  24.   unfortunately, so I don't know what it says on the issue.)
  25.  
  26. * Power C's reference says "int main".
  27.  
  28. What would be interesting is to go back to some pre-ANSI DOS-based C
  29. books (I have a couple) and see what they say, or even the reference
  30. for DOS compilers. If Microsoft blew it, then the issue must not be
  31. very well understood. MS is usually pretty rigorous in their conformance
  32. to ANSI standards. (I think C7 was the *second* ANSI C version, wasn't
  33. it? Wasn't C6 ANSI compatible?)
  34.  
  35. BTW, I still don't see how "void main" is simpler than "main".
  36.  
  37. Scott
  38.  
  39.